var frm = this.getMainView();
if (!frm.isValid()) {
    return;
}

var me = this;
Ext.Msg.show({
    title: button.getText(),
    msg: T.msg.are_you_sure_to_merge_material_sn,
    icon: Ext.Msg.QUESTION,
    buttons: Ext.Msg.YESNO,
    fn: function(btnId) {
        if ('yes' == btnId) {
            button.setDisabled(true);

            YX.ZbusRpc.request({
                module: 'SmatMergeMaterialSnService',
                params: {
                    fromMsn: me.getItem('txtFromMsn').getValue(),
                    toMsn: me.getItem('txtToMsn').getValue(),
                    moveQty: me.getItem('numMoveQty').getValue()
                },
                showSuccess: true,
                callback: function() {
                    button.setDisabled(false);
                },
                success: function() {
                    frm.reset();
                    me.getItem('txtFromMsn').focus();
                }
            });
        }
    }
})